import { connect } from "react-redux";
import styled from "styled-components";

const AppFooterStyled = styled.div`
  height: 43px;
  margin-top: 60px;
  padding: 0 16px;

  text-align: center;
  footer {
    color: #000;
    font-size: 14px;

    a {
      color: #000;
      margin-left: 5px;
    }
  }
`;

const AppFooter = (props) => {
  const { blogConfig } = props;
  return (
    <AppFooterStyled>
      <footer>
        <p>
          Copyright©2023
          <a
            href="https://github.com/szluyu99"
            target="__blank"
            hover="decoration-underline color-primary"
          >
            szluyu99
          </a>
        </p>
        <p>
          <a
            href="http://beian.miit.gov.cn/"
            target="__blank"
            hover="decoration-underline color-primary"
          >
            {blogConfig.website_record ?? "备案信息未知"}
          </a>
        </p>
      </footer>
    </AppFooterStyled>
  );
};

export default connect((state) => state.app, null)(AppFooter);
